package com.sskjdata.cg.exception;


import com.sskjdata.cg.dto.ResponseCodeEnum;

/**
 * @Descirption 所有智能选品自定义异常的父类
 * @Author Jason
 * @Date 2018/11/30/
 */
public class IntelligentException extends RuntimeException{

    private ResponseCodeEnum responseCodeEnum;

    public ResponseCodeEnum getResponseCodeEnum() {
        return responseCodeEnum;
    }

    public void setResponseCodeEnum(ResponseCodeEnum responseCodeEnum) {
        this.responseCodeEnum = responseCodeEnum;
    }

    private static final long serialVersionUID = -6689513086091556179L;

    public IntelligentException() {
        this(ResponseCodeEnum.ERROR);
    }

    public IntelligentException(ResponseCodeEnum responseCodeEnum) {
        super(responseCodeEnum.getMsg());
        this.responseCodeEnum = responseCodeEnum;
    }

    public IntelligentException(ResponseCodeEnum responseCodeEnum, String msg) {
        super(msg);
        this.responseCodeEnum = responseCodeEnum;
    }


    public IntelligentException(String message) {
        super(message);
    }

    public IntelligentException(String message, Throwable cause) {
        super(message, cause);
    }

    public IntelligentException(Throwable cause) {
        super(cause);
    }

    public IntelligentException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
